﻿@using BootstrapBlazor.Shared.Samples;
@inject IStringLocalizer<Selects> Localizer

<div class="row g-3">
    <div class="col-12 col-sm-6">
        <Select TValue="string" Color="Color.Primary" Items="Items" IsDisabled="true"></Select>
    </div>
    <div class="col-12 col-sm-6">
        <Select TValue="string" Color="Color.Success" Items="Items" IsDisabled="true"></Select>
    </div>
    <div class="col-12 col-sm-6">
        <Select TValue="string" Color="Color.Danger" Items="Items" IsDisabled="true"></Select>
    </div>
    <div class="col-12 col-sm-6">
        <Select TValue="string" Color="Color.Warning" Items="Items" IsDisabled="true"></Select>
    </div>
    <div class="col-12 col-sm-6">
        <Select TValue="string" Color="Color.Info" Items="Items" IsDisabled="true"></Select>
    </div>
    <div class="col-12 col-sm-6">
        <Select TValue="string" Color="Color.Secondary" Items="Items" IsDisabled="true"></Select>
    </div>
    <div class="col-12 col-sm-6">
        <Select TValue="string" Color="Color.Dark" Items="Items" IsDisabled="true"></Select>
    </div>
</div>
<p class="mt-3">@((MarkupString)Localizer["SelectsDisableOption"].Value)</p>
<div class="row">
    <div class="col-12 col-sm-6">
        <Select TValue="string" Items="Items4" />
    </div>
</div>

@code {
    private IEnumerable<SelectedItem> Items { get; set; } = new[]
    {
        new SelectedItem ("Beijing", "北京"),
        new SelectedItem ("Shanghai", "上海") { Active = true },
    };

    private readonly IEnumerable<SelectedItem> Items4 = new[]
    {
        new SelectedItem ("Beijing", "北京") { IsDisabled = true},
        new SelectedItem ("Shanghai", "上海") { Active = true },
        new SelectedItem ("Guangzhou", "广州")
    };
}
